﻿using Microsoft.Xna.Framework.Graphics;
using Newtonsoft.Json.Linq;
using Sparklings.JsonUtils;
using Sparklings.RayTracing;

namespace Sparklings.LevelElements
{
    public class BluePlatform : Tile
    {
        public BluePlatform(Level l, int x, int y)
            : base(l, x, y, true)
        {
        }
        public override void LoadGraphicsRelatedElements()
        {
            base.LoadGraphicsRelatedElements();
            BaseTexture = Level.ContentManager.Load<Texture2D>("BluePlatform");
        }
        public override bool IsPassableBySparkling(Sparkling c) { return !c.Color.Contains(RayColor.Blue); }

        public static object ConstructFromData(JsonOverrider converter, JToken toConvert, Level level, int x, int y)
        {
            return new BluePlatform(level, x, y);
        }

    }
}
